Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Experimental Event API: add event component mount phase callback #15480

Merged
merged 2 commits into from
Apr 24, 2019

Conversation

trueadm
Copy link
Contributor

@trueadm trueadm commented Apr 23, 2019

This PR adds an onMount lifecycle event to event responders, in a similar way to the current onUnmount lifecycle. This is to be used in cases where things like <FocusScope> might want to set the initial focus of a DOM element in its scope upon mount. It works in the commit phase (a change from before) to ensure that the DOM tree has been committed at the same time.

Ref #15257

@sizebot
Copy link

sizebot commented Apr 23, 2019

ReactDOM: size: 0.0%, gzip: 0.0%

Details of bundled changes.

Comparing: 9c6ff13...6ca8cc5

react-dom

File Filesize Diff Gzip Diff Prev Size Current Size Prev Gzip Current Gzip ENV
react-dom.development.js +0.1% 0.0% 813.87 KB 814.51 KB 185.56 KB 185.62 KB UMD_DEV
react-dom.production.min.js 0.0% 0.0% 103.61 KB 103.63 KB 33.64 KB 33.66 KB UMD_PROD
react-dom.profiling.min.js 0.0% 0.0% 106.76 KB 106.78 KB 34.65 KB 34.65 KB UMD_PROFILING
react-dom.development.js +0.1% 0.0% 808.35 KB 808.99 KB 184.03 KB 184.08 KB NODE_DEV
react-dom.production.min.js 0.0% 0.0% 103.6 KB 103.62 KB 33.1 KB 33.11 KB NODE_PROD
react-dom.profiling.min.js 0.0% 0.0% 106.92 KB 106.95 KB 33.95 KB 33.95 KB NODE_PROFILING
ReactDOM-dev.js +0.1% 0.0% 832.65 KB 833.27 KB 185.38 KB 185.44 KB FB_WWW_DEV
ReactDOM-prod.js 🔺+0.2% 🔺+0.1% 339.63 KB 340.2 KB 63.01 KB 63.07 KB FB_WWW_PROD
ReactDOM-profiling.js +0.2% +0.1% 345.04 KB 345.61 KB 63.92 KB 63.99 KB FB_WWW_PROFILING
react-dom-unstable-fire.development.js +0.1% 0.0% 814.2 KB 814.83 KB 185.7 KB 185.75 KB UMD_DEV
react-dom-unstable-fire.production.min.js 0.0% 0.0% 103.62 KB 103.64 KB 33.65 KB 33.67 KB UMD_PROD
react-dom-unstable-fire.profiling.min.js 0.0% 0.0% 106.77 KB 106.79 KB 34.66 KB 34.66 KB UMD_PROFILING
react-dom-unstable-fire.development.js +0.1% 0.0% 808.68 KB 809.31 KB 184.16 KB 184.22 KB NODE_DEV
react-dom-unstable-fire.production.min.js 0.0% 0.0% 103.61 KB 103.63 KB 33.11 KB 33.11 KB NODE_PROD
react-dom-unstable-fire.profiling.min.js 0.0% 0.0% 106.94 KB 106.96 KB 33.96 KB 33.96 KB NODE_PROFILING
ReactFire-dev.js +0.1% 0.0% 831.83 KB 832.46 KB 185.38 KB 185.47 KB FB_WWW_DEV
ReactFire-prod.js 🔺+0.2% 🔺+0.1% 327.63 KB 328.19 KB 60.6 KB 60.66 KB FB_WWW_PROD
ReactFire-profiling.js +0.2% +0.1% 333 KB 333.57 KB 61.54 KB 61.6 KB FB_WWW_PROFILING
react-dom-test-utils.development.js 0.0% 0.0% 54.19 KB 54.19 KB 14.98 KB 14.98 KB UMD_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 10.52 KB 10.52 KB 3.9 KB 3.89 KB UMD_PROD
react-dom-test-utils.development.js 0.0% 0.0% 53.91 KB 53.91 KB 14.91 KB 14.91 KB NODE_DEV
react-dom-test-utils.production.min.js 0.0% -0.0% 10.31 KB 10.31 KB 3.82 KB 3.82 KB NODE_PROD
react-dom-unstable-native-dependencies.development.js 0.0% -0.0% 60.76 KB 60.76 KB 15.85 KB 15.85 KB UMD_DEV
react-dom-unstable-native-dependencies.production.min.js 0.0% -0.0% 10.69 KB 10.69 KB 3.67 KB 3.67 KB UMD_PROD
react-dom-server.browser.development.js 0.0% 0.0% 136.73 KB 136.73 KB 35.92 KB 35.92 KB UMD_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 19.18 KB 19.18 KB 7.21 KB 7.21 KB UMD_PROD
react-dom-server.browser.development.js 0.0% 0.0% 132.86 KB 132.86 KB 34.99 KB 34.99 KB NODE_DEV
react-dom-server.browser.production.min.js 0.0% 0.0% 19.1 KB 19.1 KB 7.2 KB 7.2 KB NODE_PROD
ReactDOMServer-dev.js 0.0% -0.0% 134.95 KB 134.95 KB 34.61 KB 34.61 KB FB_WWW_DEV
ReactDOMServer-prod.js 0.0% -0.0% 47.14 KB 47.14 KB 10.8 KB 10.8 KB FB_WWW_PROD
react-dom-server.node.development.js 0.0% 0.0% 134.8 KB 134.8 KB 35.53 KB 35.54 KB NODE_DEV
react-dom-server.node.production.min.js 0.0% 0.0% 19.96 KB 19.96 KB 7.51 KB 7.51 KB NODE_PROD
react-dom-unstable-fizz.node.production.min.js 0.0% -0.1% 1.1 KB 1.1 KB 667 B 666 B NODE_PROD

Generated by 🚫 dangerJS

@trueadm trueadm merged commit d3af2f2 into facebook:master Apr 24, 2019
@trueadm trueadm deleted the event-component-mount branch April 24, 2019 09:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants